package n1579;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	static int f[][][]=new int[21][21][21];
	
	static void init()
	{
		for(int i=0;i<21;i++)
			for(int j=0;j<21;j++)
				for(int k=0;k<21;k++)
					f[i][j][k]=-1;
	}
	
	static int solve(int a,int b,int c)
	{
		if(a<=0||b<=0||c<=0)return 1;
		if(a>20||b>20||c>20)return solve(20,20,20);
		if(f[a][b][c]!=-1)return f[a][b][c];
		if(a<b&&b<c)
		{
			f[a][b][c]=solve(a,b,c-1)+solve(a,b-1,c-1)-solve(a,b-1,c);
		}
		else f[a][b][c]=solve(a-1,b,c)+solve(a-1,b-1,c)+solve(a-1,b,c-1)-solve(a-1,b-1,c-1);
		
		return f[a][b][c];
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		init();
		BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
		while(true)
		{
			StringTokenizer st=new StringTokenizer(bf.readLine());
			int a=Integer.parseInt(st.nextToken());
			int b=Integer.parseInt(st.nextToken());
			int c=Integer.parseInt(st.nextToken());
			if(a==-1&&b==-1&&c==-1)break;
			System.out.println("w("+a+", "+b+", "+c+") = "+solve(a,b,c));
		}
	}

}
